#include "proc.h"

void count()
{
    int i = 10;
    while(i)
    {
      printf("%-2d\r",i);
      fflush(stdout);
      sleep(1);
      i--;
    }
}


void jindu()
{
  int i = 0;
  char buf[103] = {0};

  while(i<=100)
  {
    const char * p = "|/-\\";
    printf("[%-100s][%d%%][%c]\r",buf,i,p[i%4]);
    buf[i] = '#';
    fflush(stdout);
    i++;
    usleep(50000);
  }
  printf("\n");
  
}
